package org.amphiprion.descentv2assistant.entity.comparator;

import java.util.Comparator;

import org.amphiprion.descentv2assistant.entity.EncounterMonster;

public class EncounterMonsterComparator implements Comparator<EncounterMonster> {

	@Override
	public int compare(EncounterMonster lhs, EncounterMonster rhs) {
		int result;
		result = lhs.getMonster().getClass().getSimpleName().compareTo(rhs.getMonster().getClass().getSimpleName());
		if (result == 0) {
			result = lhs.getMonster().getName().compareTo(rhs.getMonster().getName());
		}
		return result;

	}

}
